<div class="widget">
	<div class="widget-border">
		<div class="widget-header"><%= @_user.login %></div>
		<div class="widget-content">
			<center>
				<% if @_user.avatar %>
					<img src="<%= @_user.avatar.url %>" />
					<br/>
					<%= link_to_lightbox '修改头像', '_upload_avatar' %>
				<% else %>
					还没有上传头像
					<br/>
					<%= link_to_lightbox '上传头像', '_upload_avatar' %>
				<% end %>
			</center>
			<%= link_to_lightbox '发短消息', '_send_message' %> 
			<%= link_to_lightbox '加为好友', '_add_friend' %>
			<div id='_send_message' style='display: none'>
				<% form_tag send_message_path(@_user.id) do -%>
					<table>
						<tr>
							<td style="text-align: left">对<b><%= @_user.login %></b>说:</td>
						</tr>
						<tr>
							<td><%= text_area_tag 'message', nil, :size => '40x5' %></td>
						</tr>
						<tr>
							<td style="text-align: right"><%= submit_tag '发送' %></td>
						</tr>
					</table>
				<% end -%>
			</div>
			<div id='_upload_avatar' style='display: none'>
				<%= upload_form_tag( :controller => 'blogs', :action => 'upload_avatar' ) %>
					<table>
						<tr>
							<td style="text-align: left">上传头像:</td>
						</tr>
						<tr>
							<td>
								<input type="hidden" name="user_id" value="<%= @_user.id %>" />
								<%= upload_column_field 'user', 'avatar'  %>
							</td>
						</tr>
						<tr>
							<td style="text-align: right"><%= submit_tag '上传' %></td>
						</tr>
					</table>
				<%= end_form_tag %>
			</div>
		</div>
	</div>
</div>